home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
090
/
pctj8505.arc
/
BUG2.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1986-09-14
|
768b
|
32 lines
{ BUG2.PAS }
{ This program demonstrates how MS-Pascal 3.20 }
{ fumbles with nested REAL assignments. }
{ }
PROGRAM bug2(output) ;
PROCEDURE outer ;
VAR
x,y : real ;
PROCEDURE inner ;
BEGIN {inner}
x := y ;
writeln('x and y should both equal 77.77') ;
writeln('x = ',x) ;
writeln('y = ',y) ;
END ; {inner}
BEGIN {outer}
x := 55.55 ;
y := 77.77 ;
inner ;
END ; {outer}
BEGIN {bug2}
writeln('BUG2 RESULTS') ;
outer ;
END. {bug2}